package com.joker.warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.joker.warehouse.mapper.PmsSupplierMapper;
import com.joker.warehouse.domain.PmsSupplier;
import com.joker.warehouse.service.IPmsSupplierService;

/**
 * 供应商Service业务层处理
 *
 * @author joker
 * @date 2025-01-14
 */
@Service
public class PmsSupplierServiceImpl implements IPmsSupplierService
{
    @Autowired
    private PmsSupplierMapper pmsSupplierMapper;

    /**
     * 查询供应商
     *
     * @param id 供应商主键
     * @return 供应商
     */
    @Override
    public PmsSupplier selectPmsSupplierById(Long id)
    {
        return pmsSupplierMapper.selectPmsSupplierById(id);
    }

    /**
     * 查询供应商列表
     *
     * @param pmsSupplier 供应商
     * @return 供应商
     */
    @Override
    public List<PmsSupplier> selectPmsSupplierList(PmsSupplier pmsSupplier)
    {
        return pmsSupplierMapper.selectPmsSupplierList(pmsSupplier);
    }

    /**
     * 新增供应商
     *
     * @param pmsSupplier 供应商
     * @return 结果
     */
    @Override
    public int insertPmsSupplier(PmsSupplier pmsSupplier)
    {
        return pmsSupplierMapper.insertPmsSupplier(pmsSupplier);
    }

    /**
     * 修改供应商
     *
     * @param pmsSupplier 供应商
     * @return 结果
     */
    @Override
    public int updatePmsSupplier(PmsSupplier pmsSupplier)
    {
        return pmsSupplierMapper.updatePmsSupplier(pmsSupplier);
    }

    /**
     * 批量删除供应商
     *
     * @param ids 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deletePmsSupplierByIds(Long[] ids)
    {
        return pmsSupplierMapper.deletePmsSupplierByIds(ids);
    }

    /**
     * 删除供应商信息
     *
     * @param id 供应商主键
     * @return 结果
     */
    @Override
    public int deletePmsSupplierById(Long id)
    {
        return pmsSupplierMapper.deletePmsSupplierById(id);
    }
}
